#ifndef ImageReconstruction_h__
#define ImageReconstruction_h__
#pragma once

#include <map>
#include <vector>
using namespace std;


#include <cv.h>
#include <cxcore.h>
#include <highgui.h>

#include "DataTypeDefs.h"

#define  IMAGE_PAIR_SIZE 2
class CCenterlineAnalyzer
{
public:
	CCenterlineAnalyzer(void);
	~CCenterlineAnalyzer(void);

public:
	bool initFromFile(char* fileName1, char* fileName2);
    int  getWidth() {return m_nWidth;}
    int  getHeight(){return m_nHeight;}
	SPointI* getValidImageData(int idx);
	int  getValidImageDataSize(int idx);
	bool lookforIndexedPoint(int idxImage, int idxPoint);

private:
    bool filterValidData();
	double getImageData(int idx, int idy, int image=0);

private:
	int m_nWidth, m_nHeight;
	IplImage *m_imgGrey[IMAGE_PAIR_SIZE];

    MIPoints m_mValidPts[IMAGE_PAIR_SIZE];
	VIPoints m_vValidPts[IMAGE_PAIR_SIZE];
};

#endif // ImageReconstruction_h__
